<?php
use think\facade\Route;


/**
 * 分销管理 相关路由
 */
Route::group('activity', function () {
    // 活动列表
    Route::get('activity/list', 'v1.activity.Activity/index')->name('activityList')->option(['real_name' => '活动列表']);
    Route::post('activity/save/:id', 'v1.activity.Activity/save')->name('saveActivity')->option(['real_name' => '新建/编辑活动']);

    Route::get('activity/detail/:id', 'v1.activity.Activity/detail')->name('activityDetail')->option(['real_name' => '活动详情']);

    Route::get('activity/export', 'v1.activity.Activity/export')->name('activityExport')->option(['real_name' => '活动导出']);

    //设置批量活动上架
    Route::put('activity/activity_show', 'v1.activity.Activity/activity_show')->option(['real_name' => '设置批量活动上架']);
    //设置批量活动下架
    Route::put('activity/activity_unshow', 'v1.activity.Activity/activity_unshow')->option(['real_name' => '设置批量活动下架']);

    //设置批量活动置顶
    Route::put('activity/activity_top', 'v1.activity.Activity/activity_top')->option(['real_name' => '设置批量活动置顶']);
    //设置批量活动取消置顶
    Route::put('activity/activity_down', 'v1.activity.Activity/activity_down')->option(['real_name' => '设置批量活动取消置顶']);

    // 删除分类
    Route::delete('activity/:id', 'v1.activity.Activity/delete')->option(['real_name' => '删除活动']);

    //分类列表
    Route::get('activity_category', 'v1.activity.ActivityCategory/index')->name('activityCategory')->option(['real_name' => '活动标签列表']);
    //分类树形列表
    Route::post('activity_category/save/:id', 'v1.activity.ActivityCategory/save')->name('saveActivityCategory')->option(['real_name' => '新建/保存活动标签']);
    // 删除分类
    Route::delete('activity_category/:id', 'v1.activity.ActivityCategory/delete')->option(['real_name' => '删除活动分类']);

    //设置批量活动上架
    Route::put('activity_category/show', 'v1.activity.ActivityCategory/show')->option(['real_name' => '设置批量活动分类上架']);
    //设置批量活动下架
    Route::put('activity_category/unshow', 'v1.activity.ActivityCategory/unshow')->option(['real_name' => '设置批量活动分类下架']);

})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
    \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
    \app\adminapi\middleware\AdminLogMiddleware::class
])->option(['mark' => 'diy', 'mark_name' => '页面装修']);
